#ifndef __M_EMU_STATE_H__
#define __M_EMU_STATE_H__

#include "gui/gui.h"

#define SAVESTATE_VERSION 0x011000 // v1.10

typedef struct
{
    uint32_t version;           // 0x00
    uint32_t screenshot_offset; // 0x04
    uint32_t screenshot_size;   // 0x08
    uint32_t screenshot_width;  // 0x0C
    uint32_t screenshot_height; // 0x10
    uint32_t preview_offset;    // 0x14
    uint32_t preview_size;      // 0x18
    uint32_t preview_width;     // 0x1C
    uint32_t preview_height;    // 0x20
    uint32_t disk_index;        // 0x24
    char reserved[0x58];        // 0x28
} EmuStateHeader;               // 0x80

GUI_Texture *Emu_GetStateScreenshotTexture(int num);
GUI_Texture *Emu_GetStatePreviewTexture(int num);
int Emu_GetStateDiskImageIndex(int num);

int Emu_LoadState(int num);
int Emu_SaveState(int num);
int Emu_DeleteState(int num);

#endif